/*
 * Copyright (c) 2020 pig4cloud Authors. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.tenant.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.example.tenant.Converter.CustomStringConverter;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 用户部门表
 * </p>
 *
 * @author fxz
 */
@Data
@ColumnWidth(10)
@EqualsAndHashCode(callSuper = true)
public class SysUserDept extends Model<SysUserDept> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ExcelProperty("id")
    private String id;

    /**
     * 用户ID
     */
    @ExcelProperty("user_id")
    private String userId;

    /**
     * 部门ID
     */
    @ExcelProperty("dept_id")
    private String deptId;

    /**
     * 人员在该机构中的编号
     */
    @ExcelProperty("user_code")
    private String userCode;

    /**
     * 兼职类型，1隶属、2兼职、3组成成员
     */
    @ExcelProperty("job_type")
    private String jobType;

    /**
     * 机构职务
     */
    @ExcelProperty("duty")
    private String duty;

    /**
     * 届号
     */
    @ExcelProperty("session_num")
    private String sessionNum;

    /**
     * 任职开始时间
     */
    @ExcelProperty("start_time")
    private Date startTime;

    /**
     * 任职结束时间
     */
    @ExcelProperty("end_time")
    private Date endTime;

    /**
     * 任职状态
     */
    @ExcelProperty("status")
    private String status;

    /**
     * 岗位标识
     */
    @ExcelProperty("post_id")
    private String postId;

    /**
     * 职务分工
     */
    @ExcelProperty("work")
    private String work;

    /**
     * 备注
     */
    @ExcelProperty("remark")
    private String remark;

    /**
     * 序号
     */
    @ExcelProperty("order_num")
    private String orderNum;

    /**
     * 创建人
     */
    @ExcelProperty(value = "create_by", converter = CustomStringConverter.class)
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    /**
     * 创建时间
     */
    @ExcelProperty("create_time")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty(value = "update_by", converter = CustomStringConverter.class)
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ExcelProperty("update_time")
    private Date updateTime;

}
